package com.wish.email.controller;

import com.wish.email.service.MailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.mail.javamail.JavaMailSender;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RequestMapping("/email")
@RestController
public class EmailController {

    @Autowired
    MailService mailService;


    @RequestMapping("/send")
    public void sendEmail(String subject,  String from,  String to, String context){
        mailService.sendEmail(subject, from,to,context);
    }

}
